{{--@foreach($services as $service)--}}
{{--<div style='border:solid 1px #ff0000'>--}}
{{--<img style="width: 80px;height: 80px;"  src="{{ $PATH }}{{ $service->work->avatar }}">--}}
{{--@if($service->type == 1)--}}
{{--试用申请--}}
{{--@endif--}}

{{--@if($service->state == 1)--}}
{{--提交日期--}}
{{--@elseif($service->state == 2)--}}
{{--派单日期--}}
{{--@elseif($service->state == 3)--}}
{{--上门日期--}}
{{--@endif--}}

{{--{{ $service->updated_at }}--}}
{{--</div>--}}
{{--@endforeach--}}


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>雷谛科技</title>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" type="text/css" href="{{ URL::asset('newstyle/css/drink.css') }}" />
</head>
<body>
<header id="header">
  <a href="{{ route('customers.index') }}">
    <img src="{{ URL::asset('newstyle/images/arrow_left.png ') }}" alt="" width="8" class="arrow_left">
  </a>
  <h3>商城订单</h3>
</header>
<div>
  <ul class="listcenter">


    <li @if($type != 'will' && $type != 'final')class="hover"@endif>
      <a href="{{ route('buyrecords.index') }}">全部</a>
    </li>
    <li @if($type == 'will')class="hover"@endif>
      <a href="{{ route('buyrecords.index',array('type'=>'will')) }}">未付款</a>
    </li>
    <li @if($type == 'final')class="hover"@endif>
      <a href="{{ route('buyrecords.index',array('type'=>'final')) }}">已完成</a>
    </li>



  </ul>
</div>
 @foreach($buyrecords as $buyrecord)
<div class="shop_state">
  <p>订单状态<span><a href="{{ route('buyrecords.show',$buyrecord->id) }}">
   @if($buyrecord->state == 0)
     待付款
     @elseif($buyrecord->state == 1)
     积分兑换
     @elseif($buyrecord->state == 2)
     微信支付
     @else
     已取消
     @endif
   </a>
 </span></p>
  <div class="orderList">
    <ul>
      <li>
        <a href="{{ route('buyrecords.show',$buyrecord->id) }}">
          <img src="{{ $PATH }}{{ $buyrecord->Commodity->cover }}" alt="" width="80" class="spimg">
          <p class="descri">{{ $buyrecord->Commodity->name }}</p>
          <p><span>积分<em>{{ $buyrecord->Commodity->member_points }}</em></span></p>
        </a>
      </li>
    </ul>
  </div>
  <span class="total">
    共一件商品:实付：<em>{{ $buyrecord->Commodity->member_points }}积分</em>
  </span>
  <div class="shop_order cl">
  @if($buyrecord->state == 0)
    <p><a href="{{ route('buyrecords.show',$buyrecord->id) }}">付款</a></p>
    @endif
  </div>
</div>
@endforeach
</body>
</html>
